home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3465 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  784 b 

  1. Path: news.itd.umich.edu!clahey
  2. From: clahey@rep00703.reshall.umich.edu (Chris Lahey)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Clearing the keyboard buffer in ANSI C
  5. Date: 29 Jan 1996 07:32:11 GMT
  6. Organization: University of Michigan
  7. Message-ID: <CLAHEY.96Jan29073211@rep00703.reshall.umich.edu>
  8. References: <tfiedler-2801961347210001@205.217.163.224>
  9. NNTP-Posting-Host: rep00703.reshall.umich.edu
  10. In-reply-to: tfiedler@muscanet.com's message of 28 Jan 1996 19:39:50 GMT
  11.  
  12. In article <tfiedler-2801961347210001@205.217.163.224> tfiedler@muscanet.com (Todd A. Fiedler) writes:
  13.  
  14.    I am a newbie to C and I can't figure out how to clear the keyboard buffer.
  15.  
  16. I use 
  17.  
  18. while (getchar() != '\n');
  19.  
  20. If that's not what you want you should check out getchar() anyway.
  21. Good Luck with it.
  22.     Chris
  23.